//
//  NSArray+Addtions.m
//  KNBaseModule
//
//  Created by vbn on 2019/2/18.
//

#import "NSArray+Addtions.h"

@implementation NSArray (Addtions)

- (NSObject *)KNNextObjectWithCurrentObject:(NSObject *)current {
    NSUInteger index = [self indexOfObject:current];
    if (index == NSNotFound) {
        return nil;
    }
    if (index == self.count -1) {
        index = 0;
    } else {
        index++;
    }
    return [self objectAtIndex:index];
}

@end
